<#if formField.hidden?? && formField.hidden=="1">
	<!-- 隐藏 -->
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	<input type=hidden id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField??>value="${businessInstanceField.value?default('')}" </#if>></input>
<#else>
	<#if formField.readonly?? && formField.readonly=="1">
		<#if linkOpter??>${linkOpter}</#if>
	<#else>
		<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
		<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
		<input type="hidden" id="${field.name}" name="fieldMap['${field.name}'].entityId"  <#if businessInstanceField?? && businessInstanceField.entityId??>value="${businessInstanceField.entityId}" </#if> > </input>
		
		<input type="text" readonly="readonly" id="${field.name}Id" name="${field.name}Names" class="textTest"  <#if disPlayName??>value="${disPlayName}" </#if>> 
			
			
		<input type=hidden name="fieldMap['${fieldType}'].id"  >

		<input type=hidden name="fieldMap['${fieldType}'].field.id"  value="${fieldTypeID}">
			
		<input type="hidden" id="${fieldType}" name="fieldMap['${fieldType}'].value"  <#if fieldTypeVal??>value="${fieldTypeVal}" </#if> > </input>
		
		<input type=hidden name="fieldMap['${fieldFactory}'].id"  >

		<input type=hidden name="fieldMap['${fieldFactory}'].field.id"  value="${fieldFactoryID}">
		
		<input type="hidden" id="${fieldFactory}" name="fieldMap['${fieldFactory}'].entityId"  <#if fieldFactoryVal??>value="${fieldFactoryVal}" </#if> > </input>
		
		<input type=hidden name="fieldMap['${fieldStation}'].id"  >

		<input type=hidden name="fieldMap['${fieldStation}'].field.id"  value="${fieldStationID}">
		
		<input type="hidden" id="${fieldStation}" name="fieldMap['${fieldStation}'].entityId"  <#if fieldStationVal??>value="${fieldStationVal}" </#if> > </input>
		
			
	</#if>

	<script language="JavaScript">
	$(document).ready(function(){
		 $(document.getElementById('${field.name}Id')).inputStyle({
			operatorType:"text",
			operatorText:"选择",
			controllerWidth:'${formField.width?default('200')}',
			operatorFun:showMenu${field.id}
		});
	});
	
	function viewFactoryStation(id, title, type) {
		var url = '';
		
		if (type=='1'){
			url+=TDQS.CONTEXT_PATH+"business/process?tdqssid="+TDQS.SESSION_ID+"&function.id=foundation_power_fac_function_11";
			url+="&businessProcess.id=foundation_power_factory_0000001";
		} else {
			url+=TDQS.CONTEXT_PATH+"business/process??tdqssid="+TDQS.SESSION_ID+"&function.id=foundation_transf_st_function_11";
			url+="&businessProcess.id=foundation_transf_station_000001";
		}
		
		url+="&businessInstance.id="+id+'&isHideButton=1';
		
	    new Win({
			url:url,
			title:title,
			width:980,
			height:500,
			center:true,
			resizable:false
		});
	}
	
	function showMenu${field.id}(){
		var id = $('#${field.name}').val();
		var type=$('#${fieldType}').val();
		new Win({
			url:TDQS.CONTEXT_PATH+"foundation/showFactoryStation?factoryStationId="+id+"&factoryStationType="+type+'&saveFunction=save${field.id}&cleanFunction=clean${field.id}',
			title:"电厂变电站",
			width:550,
			height:320,
			center:true,
			resizable:false
		});
	}
	
	function save${field.id}(rec,type){
		var id = rec.id;
		var name = type=='1'?rec.powerInfo.name:rec.name;
		
		$('#${field.name}Id').val(name);
		$('#${field.name}').val(id);
		
		if(type==1){
			$('#${fieldType}').val(type);
			$('#${fieldFactory}').val(id);
			$('#${fieldStation}').val("");
		}else{
			$('#${fieldType}').val(type);
			$('#${fieldStation}').val(id);
			$('#${fieldFactory}').val("");
		}
		window.curWin.saveWin();
	}
	
	function clean${field.id}(){		
		$('#${field.name}Id').val("");
		$('#${field.name}').val("");
		$('#${fieldType}').val(1);
		$('#${fieldFactory}').val("");
		$('#${fieldStation}').val("");
		window.curWin.saveWin();
	}
	</script>
</#if>